package com.szgr.baoyin.pay;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;

import com.szgr.baoyin.MainActivity;
import com.szgr.baoyin.R;
import com.szgr.baoyin.activity.BaseActivity;
import com.szgr.baoyin.activity.ToolStoreActivity;
import com.szgr.baoyin.activity.WebActivity;
import com.szgr.baoyin.utils.ViewFindUtils;

public class PaySuccessActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setContentView(R.layout.activity_pay_success);
        super.onCreate(savedInstanceState);
    }

    @Override
    public void initActionBar() {
        actionBarTitle.setText("支付结果");
    }

    @Override
    public void initView() {
        TextView tv_back = ViewFindUtils.find(view,R.id.back);
        TextView tv_buy = ViewFindUtils.find(view,R.id.buy);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.action_bar_left:
                finish();
                break;
            case R.id.back:
                Intent intent1 = new Intent(this,MainActivity.class);
                intent1.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
                startActivity(intent1);
                finish();
                break;
            case R.id.buy:
                Intent intent2 = new Intent(this,ToolStoreActivity.class);
                intent2.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
                startActivity(intent2);
                finish();
                break;
        }
    }
}
